home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-26 | 1.4 KB | 28 lines | [TEXT/$Tcl] |
-
-
- server_open ?option? host service
- Open a TCP/IP connection to a server of host on the
- port specified by service. The server is then accessed
- using the standard Tcl file I/O commands. Host may be
- a host name or an IP address. Port may be a port
- number of a service name. Option is one of -buf or
- -nobuf. If no options is specified, -buf is the
- default.
-
- If -buf is specified, then the file is buffered. In
- this case, a pair of Tcl file ids are returned in a
- list. The first id is open for read access, the second
- for write. When writing to the file, the flush command
- must be used to force data in the buffer to be sent to
- the server. The close command must be called against
- both file ids when through with the socket. Buffered
- access will result in significantly better performance
- when reading data and will also improve a series of
- writes being done with out intermixed reads. The fcntl
- command may be used to make one of these files unbuf-
- fered.
-
- if -nobuf is specified, then the file is unbuffered and
- a single file id, open for both reading and writing, is
- returned.
-